package com.hui;

import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;

/**
 * @author zhang zhongtao
 * @version 1.0.0.20191112
 * @since JDK V1.8
 */
@Slf4j
public class MyJobListener implements JobExecutionListener {

    @Override
    public void beforeJob(JobExecution jobExecution) {
        log.info("\n\rMyJobListener.beforeJob:{}", jobExecution.getJobInstance().getJobName());
    }

    @Override
    public void afterJob(JobExecution jobExecution) {
        log.info("\n\rMyJobListener.afterJob:{}", jobExecution.getJobInstance().getJobName());

    }
}
